package com.qingxin.repertory.entity;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * 库存
 * @author Administrator
 *
 */
@Entity
@Table(name = "repertory")
public class Repertory extends com.qingxin.sys.entity.BaseEntity implements
java.io.Serializable {
	
	private static final long serialVersionUID = 9008539959521905652L;
	
	private String repertoryid;//库存id
	private String parkid;//园区id
	private String productType;//生产类型 1：种植  2：养殖 3:加工
	private String materialType;//物资类型    种植( 1：种子 2：肥料  3：农药 )  养殖（  1:饲料  2：药品  ） 加工（  1:特殊 ）
	private String materialName; //物资名称
	private String ingredient; //成分
	private String batchNum; //批号
	private String producer; //生产商
	private String phi; //安全间隔期
	private String repImg; //图片
	private BigDecimal amount;//库存总数量
	private BigDecimal repertory_num;
	private BigDecimal used_num;//已使用数量
	private String remark;
	private String createBy;
	private Date createTime;
	private String unit;//单位
	private String specification;//规格
	private String model;//型号
	
	//无参构造
	public Repertory() {
		super();
		// TODO Auto-generated constructor stub
	}
	//构造
	public Repertory(String repertoryid, String parkid,String productType, String materialType,
			String materialName, BigDecimal amount, BigDecimal repertory_num,
			BigDecimal used_num, String createBy, Date createTime, String unit) {
		super();
		this.repertoryid = repertoryid;
		this.parkid = parkid;
		this.productType = productType;
		this.materialType = materialType;
		this.materialName = materialName;
		this.amount = amount;
		this.repertory_num = repertory_num;
		this.used_num = used_num;
		this.createBy = createBy;
		this.createTime = createTime;
		this.unit = unit;
	}
	
	
	public Repertory(String repertoryid, String materialName, String batchNum,
			String producer, BigDecimal repertory_num, Date createTime, String unit) {
		this.repertoryid = repertoryid;
		this.materialName = materialName;
		this.batchNum = batchNum;
		this.producer = producer;
		this.repertory_num = repertory_num;
		this.createTime = createTime;
		this.unit = unit;
	}
	
	public Repertory(String repertoryid, String parkid,String productType, String materialType,
			String materialName, String ingredient, String batchNum,
			String producer, String phi,String repImg, BigDecimal amount,
			BigDecimal repertory_num, BigDecimal used_num, String createBy,
			Date createTime, String unit) {
		super();
		this.repertoryid = repertoryid;
		this.parkid = parkid;
		this.productType = productType;
		this.materialType = materialType;
		this.materialName = materialName;
		this.ingredient = ingredient;
		this.batchNum = batchNum;
		this.producer = producer;
		this.phi = phi;
		this.repImg = repImg;
		this.amount = amount;
		this.repertory_num = repertory_num;
		this.used_num = used_num;
		this.createBy = createBy;
		this.createTime = createTime;
		this.unit = unit;
	}
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "repertoryid", unique = true, nullable = false, length = 32)
	public String getRepertoryid() {
		return repertoryid;
	}
	public void setRepertoryid(String repertoryid) {
		this.repertoryid = repertoryid;
	}
	
	@Column(name="parkid",length = 32)
	public String getParkid() {
		return parkid;
	}
	public void setParkid(String parkid) {
		this.parkid = parkid;
	}
	
	@Column(name="product_type",length = 1)
	public String getProductType() {
		return productType;
	}
	public void setProductType(String productType) {
		this.productType = productType;
	}
	
	@Column(name="material_type",length = 1)
	public String getMaterialType() {
		return materialType;
	}
	public void setMaterialType(String materialType) {
		this.materialType = materialType;
	}
	
	@Column(name="material_name",length = 100)
	public String getMaterialName() {
		return materialName;
	}
	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}
	
	@Column(name = "amount", precision = 15, scale = 5)
	public BigDecimal getAmount() {
		return amount;
	}
	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}
	
	@Column(name = "repertory_num", precision = 15, scale = 5)
	public BigDecimal getRepertory_num() {
		return repertory_num;
	}
	public void setRepertory_num(BigDecimal repertory_num) {
		this.repertory_num = repertory_num;
	}
	
	@Column(name = "used_num", precision = 15, scale = 5)
	public BigDecimal getUsed_num() {
		return used_num;
	}
	public void setUsed_num(BigDecimal used_num) {
		this.used_num = used_num;
	}
	
	@Column(name="create_by",length = 32)
	public String getCreateBy() {
		return createBy;
	}
	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}
	
	@Column(name="create_time",length = 23)
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Column(name="unit",length = 20)
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}
	
	@Column(name="ingredient",length = 200)
	public String getIngredient() {
		return ingredient;
	}
	public void setIngredient(String ingredient) {
		this.ingredient = ingredient;
	}
	
	@Column(name="batch_num",length = 100)
	public String getBatchNum() {
		return batchNum;
	}
	public void setBatchNum(String batchNum) {
		this.batchNum = batchNum;
	}
	
	@Column(name="producer",length = 100)
	public String getProducer() {
		return producer;
	}
	public void setProducer(String producer) {
		this.producer = producer;
	}
	
	@Column(name="phi",length = 100)
	public String getPhi() {
		return phi;
	}
	public void setPhi(String phi) {
		this.phi = phi;
	}
	
	@Column(name="rep_img",length = 100)
	public String getRepImg() {
		return repImg;
	}
	public void setRepImg(String repImg) {
		this.repImg = repImg;
	}
	
	@Column(name="remark",length = 2000)
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Column(name="specification",length = 100)
	public String getSpecification() {
		return specification;
	}
	public void setSpecification(String specification) {
		this.specification = specification;
	}
	
	@Column(name="model",length = 100)
	public String getModel() {
		return model;
	}
	public void setModel(String model) {
		this.model = model;
	}
	
	
	
}
